"""Build security test"""


def scons():
    """Execute build"""
    Import('env', 'dc_sectest_tgts')

    libs = ['$LIBS', 'daos', 'daos_common', 'gurt']
    sec_sources = ['security_test.c', dc_sectest_tgts]
    acl_sources = ['acl_dump_test.c']

    denv = env.Clone()
    denv.AppendUnique(CFLAGS=['-std=gnu99'])
    denv.AppendUnique(CPPDEFINES=['TEST'])

    denv.require('argobots')

    senv = denv.Clone()
    senv.require('protobufc')

    security_test = senv.d_program('security_test', sec_sources, LIBS=libs)
    senv.Install('$PREFIX/bin/', security_test)

    acl_dump_test = denv.d_program('acl_dump_test', acl_sources, LIBS=libs)
    env.Install('$PREFIX/bin/', acl_dump_test)


if __name__ == "SCons.Script":
    scons()
